home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacFormat España 15
/
macformat_15.iso
/
C de cerca
/
Codewarrior Lite
/
MacOS Support
/
Headers
/
ANSI Headers
/
assert.h
< prev
next >
Wrap
Text File
|
1995-12-29
|
1KB
|
52 lines
/* assert.h standard header */
#include <yvals.h>
#if __MWERKS__
#pragma options align=mac68k
#if __CFM68K__ && __USING_IMPORTED_ANSI__
#pragma import on
#endif
#endif
#undef assert /* remove existing definition */
#ifdef NDEBUG
#define assert(test) ((void)0)
#else /* NDEBUG not defined */
_C_LIB_DECL
void _Assert(char *);
_END_C_LIB_DECL
/* macros */
#define _STR(x) _VAL(x)
#define _VAL(x) #x
#ifdef _VERBOSE_DEBUGGING
#include <stdio.h>
#define assert(test) ((test) ? (void)fprintf( \
stderr, __FILE__ ":" _STR(__LINE__) " " #test " -- OK\n") \
: _Assert(__FILE__ ":" _STR(__LINE__) " " #test))
#else
#define assert(test) ((test) ? (void)0 \
: _Assert(__FILE__ ":" _STR(__LINE__) " " #test))
#endif
#endif
#if __MWERKS__
#if __CFM68K__ && __USING_IMPORTED_ANSI__
#pragma import reset
#endif
#pragma options align=reset
#endif
/*
* Copyright (c) 1994 by P.J. Plauger. ALL RIGHTS RESERVED.
* Consult your license regarding permissions and restrictions.
*/
/* Change log:
*94June04 PlumHall baseline
*94Oct07 Inserted MW changes.
*/